//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.yaukie.base.datasource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DataSourceRouterHolder {
    private static final Logger log = LoggerFactory.getLogger(DataSourceRouterHolder.class);
    private static ThreadLocal<String> ROUTER_KEY = new ThreadLocal();

    public DataSourceRouterHolder() {
    }

    public static String getRouterKey() {
        return (String)ROUTER_KEY.get();
    }

    public static void setRouterKey(String dsType) {
        log.info("已将数据源切换到{}", dsType);
        ROUTER_KEY.set(dsType);
    }

    public static void removeRouterKey() {
        ROUTER_KEY.remove();
    }
}
